<%@ page import="java.util.ArrayList" %>
<%@ page import="com.du.Student" %><%--
  Created by IntelliJ IDEA.
  User: 62585
  Date: 2021/1/30
  Time: 13:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>show students</title>
    <style>
        table {
            border: 1px blue solid;
            width: 400px;
            /*将两个单元格之间的间隙合并掉*/
            border-collapse: collapse;
        }

        td, th, tr {
            border: 1px blue solid;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>电话</th>
    </tr>
    <% ArrayList<Student> students = (ArrayList<Student>) request.getAttribute("students");%>
    <%for (Student student : students) { %>
    <tr>
        <td><%=student.getId()%>
        </td>
        <td><%=student.getName()%>
        </td>
        <td><%=student.getAge()%>
        </td>
        <td><%=student.getPhone()%>
        </td>
    </tr>
    <%}%>
</table>

</body>
</html>
